The use of Shell Scripts


Informator accepts the following variables which should placed directly after "#!/bin/sh "
Keep the lines as comments!!
$$useTextOutput: Result will be displayed in a text window
$$noBeep: The result will be displayed without beep
$$useAuth: The script will always be executed with root authorisation (you can also use the apple-key to execute with root)

#variable 1 is the argument from Informator: the file path
#if you don't use Informators authorisation for your script, you can simly return your err variable
#but if you use Informators authorisation, you need to pipe the error to a file and return the file
#content


#use with Informators authorisation: you need to pipe the err to a file
myerr=$(chmod 777 "$1" >& ~/Library/Preferences/End\ If\ Preferences/ShellErr )
cat ~/Library/Preferences/End\ If\ Preferences/ShellErr



#use this if you don't need authorisation
#myerr=$(chmod 777 "$1" )
#echo $myerr

#or more simple:
#echo | chmod 777 "$1"

 End If Software 2003